package com.sikaryofficial.backend.domain.mapping;

import com.sikaryofficial.backend.domain.dto.req.productactivity.ActivityReq;
import com.sikaryofficial.backend.domain.dto.resp.productactivity.ActivityDTO;
import com.sikaryofficial.backend.domain.entity.Activity;
import com.sikaryofficial.backend.domain.vo.export.ActivityExportVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author : qinjinyuan
 * @desc : 活动映射接口
 * @date : 2023/11/03 9:19
 */
@Mapper
public interface ActivityMapping {
    ActivityMapping INSTANCE = Mappers.getMapper(ActivityMapping.class);
    /**
     * 实体映射resp
     *
     * @param activityReq
     * @return
     */
    Activity coverReqToEntity(ActivityReq activityReq);
    /**
     * 实体映射resp
     *
     * @param activity
     * @return
     */
    ActivityDTO coverEntityToDTO(Activity activity);

    List<ActivityDTO> coverToDTOs(List<Activity> activityList);
    /**
     * 实体映射resp
     * @param activity
     * @return
     */
    ActivityExportVO coverEntityToExport(Activity activity);
    /**
     * 实体映射resp
     *
     * @param activityList
     * @return
     */
    List<ActivityExportVO> coverEntityToExportList(List<Activity> activityList);
}
